﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebDownloader
{
    public class EventManager
    {


        public delegate void DelegateUpdateProgress2(int pTotal, int pCurrent, string pDescription);
        public event DelegateUpdateProgress2 EventUpdateProgress2;

        public delegate void DelegateUpdateProgress(int pTotal, int pCurrent, string pDescription);
        public event DelegateUpdateProgress EventUpdateProgress;

        public delegate void DelegateUpdateStatusLog(Guid pKey, string pMessage);
        public event DelegateUpdateStatusLog EventUpdateStatusLog;
          
        public void UpdateProgress(int pTotal, int pCurrent, string pDescription)
        {
            if (EventUpdateProgress != null) { EventUpdateProgress(pTotal, pCurrent, pDescription); }
        }

        public void UpdateProgress2(int pTotal, int pCurrent, string pDescription)
        {
            if (EventUpdateProgress2 != null) { EventUpdateProgress2(pTotal, pCurrent, pDescription); }
        }

        public void UpdateStatusLog(Guid pKey, string pMessage)
        {

            if (EventUpdateStatusLog != null) { EventUpdateStatusLog(pKey, pMessage); }
        }
         
    }
}
